<?php
class Zend_View_Helper_TopPanel
{
    public function topPanel ($controllerName, $view)
    {
		$strList="";
        if ($controllerName == 'auth' || $controllerName == 'error')
            return;
        $strList .= "<div id='submenu_sub' class='submenu_sub'>";
						
        $strList .= "";
        switch ($controllerName) {
            
            case 'group':
            	if (Utility::checkPrivilege($view, 'group', 'index'))
                    $strList .= "<a style='text-decoration: none;'  href='#' class='report'>Danh sách</a>";
            	if (Utility::checkPrivilege($view, 'group', 'add'))
                    $strList .= "<a style='text-decoration: none;'  href='#' class='add'>Thêm nhóm</a>";
                break;
            case 'user':
            	if (Utility::checkPrivilege($view, 'user', 'index'))
                    $strList .= "<a style='text-decoration: none;'  href='$view->baseUrl/admin/user/index'>Danh Sách</a>";
            	if (Utility::checkPrivilege($view, 'user', 'add'))
                    $strList .= "<a style='text-decoration: none;'  href='#'>Item Editor</a>";
            	break;  
           	case 'forum':
               	if (Utility::checkPrivilege($view, 'forum', 'index'))
                	$strList .= "<a style='text-decoration: none;'  href='$view->baseUrl/admin/forum/index'>Danh Sách Forum</a>";
            	break;
            	
            case 'typenews':
            	if (Utility::checkPrivilege($view, 'forum', 'index'))
            		$strList .= "<a style='text-decoration: none;'  href='$view->baseUrl/admin/forum/index'>Danh Sách Forum</a>";
            	break;
            case 'quest':
            	if (Utility::checkPrivilege($view, 'quest', 'index'))
            		$strList .= "<a style='text-decoration: none;'  href='$view->baseUrl/admin/quest/index'>Danh Sách</a>";
            	if (Utility::checkPrivilege($view, 'quest', 'new'))
            		$strList .= "<a style='text-decoration: none;' href='$view->baseUrl/admin/quest/new'>Câu hỏi mới mới</a>";
           		break;
        }
        $strList .= "
					
				</div>";
        echo $strList;
    }
}
?>

